package com.ruoyi.his.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.his.mapper.WarnPreLogMapper;
import com.ruoyi.his.domain.WarnPreLog;
import com.ruoyi.his.service.IWarnPreLogService;

/**
 * 处方预警Service业务层处理
 *
 * @author Alan
 * @date 2024-03-09
 */
@Service
public class WarnPreLogServiceImpl implements IWarnPreLogService
{
    @Autowired
    private WarnPreLogMapper warnPreLogMapper;

    /**
     * 查询处方预警
     *
     * @param preId 处方预警主键
     * @return 处方预警
     */
    @Override
    public WarnPreLog selectWarnPreLogByPreId(String preId)
    {
        return warnPreLogMapper.selectWarnPreLogByPreId(preId);
    }

    /**
     * 查询处方预警列表
     *
     * @param warnPreLog 处方预警
     * @return 处方预警
     */
    @Override
    public List<WarnPreLog> selectWarnPreLogList(WarnPreLog warnPreLog)
    {
        return warnPreLogMapper.selectWarnPreLogList(warnPreLog);
    }

    /**
     * 新增处方预警
     *
     * @param warnPreLog 处方预警
     * @return 结果
     */
    @Override
    public int insertWarnPreLog(WarnPreLog warnPreLog)
    {
        return warnPreLogMapper.insertWarnPreLog(warnPreLog);
    }

    /**
     * 修改处方预警
     *
     * @param warnPreLog 处方预警
     * @return 结果
     */
    @Override
    public int updateWarnPreLog(WarnPreLog warnPreLog)
    {
        return warnPreLogMapper.updateWarnPreLog(warnPreLog);
    }

    /**
     * 批量删除处方预警
     *
     * @param preIds 需要删除的处方预警主键
     * @return 结果
     */
    @Override
    public int deleteWarnPreLogByPreIds(String[] preIds)
    {
        return warnPreLogMapper.deleteWarnPreLogByPreIds(preIds);
    }

    /**
     * 删除处方预警信息
     *
     * @param preId 处方预警主键
     * @return 结果
     */
    @Override
    public int deleteWarnPreLogByPreId(String preId)
    {
        return warnPreLogMapper.deleteWarnPreLogByPreId(preId);
    }

    @Override
    public WarnPreLog getById(Long id) {
        return warnPreLogMapper.getById(id);
    }
}
